package com.cloud.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cloud.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 应用管理
 *
 * @author yzj
 * @since 2022-08-11
 */
@Data
@Schema(name = "SysApply对象", description = "系统管理")
@TableName("sys_apply")
public class SysApply extends BaseEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键")
    private Long id;

    @Schema(description = "系统编号", hidden = true)
    private String sysCode;

    @Schema(description = "应用名称")
    private String appName;

    @Schema(description = "父应用ID")
    private Long parentId;

    @Schema(description = "应用层级（M目录 Y应用）")
    private String appLevel;

    @Schema(description = "应用类型（1流程任务）")
    private String appType;

    @Schema(description = "应用图片")
    private String appImage;

    @Schema(description = "显示顺序")
    private Integer orderNum;

    @Schema(description = "路由地址")
    private String path;

    @Schema(description = "组件路径")
    private String component;

    @Schema(description = "路由参数")
    private String query;

    @Schema(description = "是否为外链（0是 1否）")
    private String isFrame;

    @Schema(description = "应用状态（0正常 1停用）")
    private String status;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "用户ID", hidden = true)
    @TableField(exist = false)
    private Long userId;

    @Schema(description = "子应用列表", hidden = true)
    @TableField(exist = false)
    private List<SysApply> children = new ArrayList<>();

}
